﻿using Pay.Model.Interfaces;
using Pay.Model.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.Dal
{
   public  interface IRoleDal
    {
        Task<bool> DeleteMenuByRoleId(long roleId);

        Task<bool> Update(RoleInfo model);
        Task<RoleInfo> GetRoleById(long Id);
        /// <summary>
        /// 获取所有列表
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        Task<List<RoleInfo>> GetRoleByType(int type);


        Task<long> Add(UserRoleInfo model);

        Task<long> Add(RoleInfo model);
        Task<bool> Delete(long roleId);

        Task<IPagedOutput<RoleInfo>> GetPage(string searchWord, DateTime? timeBegin = null, DateTime? timeEnd = null, int offset = 10, int rows = 1);


        Task<List<MenuInfo>> GetAllMenu();


        Task<long> Add(RoleMenuInfo model);

        Task<List<RoleMenuInfo>> GetMenuByRoleId(long roleId);
    }
}
